import Vue from "vue";
import { Header } from "mint-ui";
import VueRouter from 'vue-router';
Vue.use(VueRouter);

Vue.component(Header.name, Header);
import 'mint-ui/lib/style.css';
// 导入mui.css样式
import "./lib/mui/css/mui.css";
import './lib/mui/css/icons-extra.css';
//导入轮播組件
import { Swipe, SwipeItem,Button } from 'mint-ui';
Vue.component(Swipe.name, Swipe);
Vue.component(SwipeItem.name, SwipeItem);
Vue.component(Button.name,Button);
//导入时间插件
import moment from 'moment';
Vue.filter("dataFormat",function(dateStr,pattern="YYYY-MM-MM HH:mm:ss"){
    return moment(dateStr).format(pattern);
})
//导入vue-resource
import VueResource from 'vue-resource';
Vue.use(VueResource);
//设置请求数据的根路径
Vue.http.options.root = './localData';
import VuePreview from 'vue-preview';
Vue.use(VuePreview)
import app from './App.vue';
import vr from './router';
new Vue({
    el:"#app",
    render:h =>h(app),
    router: vr,
})